@model GamesLobbyModel
@{
    ViewBag.Title = "HooIzDat: Game Lobby";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section Header {
    <h2>Game Lobby</h2>
    <p class="message">@ViewBag.Message</p>
}

<div id="lobby">
        
    <div class="panel join-game">
        <div class="inner">
            <div class="header"><h3>Join a Pending Game</h3></div>
            <div class="body">
                <p>Games waiting for another player</p>
                <div id="pendingGames">
                    @{Html.RenderPartial("_PendingGames", Model.PendingGames);}
                </div>
            </div>
        </div>
    </div>
    
    <div class="panel new-game">
        <div class="inner">
            <div class="header"><h3>Start a New Game</h3></div>
            <div class="body">
                <p>Start a new game and wait for another player to join</p>
                @using (Html.BeginForm("New", "Games")) {
                    <div><input type="submit" value="Start new game" /></div>
                }
            </div>
        </div>
    </div>
        
    <div class="panel leaderboard">
        <div class="inner">
            <div class="header"><h3>Leaderboard</h3></div>
            <div class="body">
                <p>The best players are right here</p>
                @{Html.RenderPartial("_Leaderboard", Model.Leaderboard);}
            </div>
        </div>
    </div>
    
</div>